<template>
  <div class="index-page">
    <div class="banner">
      <el-carousel :interval="5000">
        <el-carousel-item v-for="(item,index) in list" :key="index">
          <div class="items">
            <img :src="item" alt="">
          </div>
        </el-carousel-item>
      </el-carousel>
    </div>
    <div class="product">

    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        require("../assets/img/test.jpeg"),
        require("../assets/img/test2.jpeg"),
      ],
      products: [
        {
          img: require("../assets/img/icon-product1.png"),
          name: "投影机灯泡",
        },
        {
          img: require("../assets/img/icon-product2.png"),
          name: "投影机过滤网",
        },
        {
          img: require("../assets/img/icon-product3.png"),
          name: "无线同屏器",
        },
        {
          img: require("../assets/img/icon-product4.png"),
          name: "投影机镜头",
        },
        {
          img: require("../assets/img/icon-product5.png"),
          name: "投影机氙灯",
        },
      ],
    };
  },
  methods: {
    play() {
      console.log(6666);
    },
  },
  created() {
    this.play();
  },
};
</script>

<style lang="less">
.index-page {
  color: pink;
  .banner {
    height: 637px;
    width: 100%;
    .items {
      height: 637px;
      width: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      position: relative;
      img {
        width: 100%;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
      }
    }
  }
  .product {
    background: #fff;
  }
}
.el-carousel__container {
  height: 637px;
}
</style>